package com.zoagroup.funzy.entity.pk;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * The primary key class for the ranking_group database table.
 * 
 */
@Embeddable
public class UserMessagePK implements Serializable {
	private static final long serialVersionUID = 1L;

	@Column(name="id_user")
	private int idUser;

	@Column(name="id_msg")
	private int idMessage;

	public UserMessagePK() {
	}
	
	public UserMessagePK(int idUser, int idMessage) {
		this.idUser = idUser;
		this.idMessage = idMessage;
	}

	public int getIdUser() {
		return idUser;
	}

	public void setIdUser(int idUser) {
		this.idUser = idUser;
	}

	public int getIdMessage() {
		return idMessage;
	}

	public void setIdMessage(int idMessage) {
		this.idMessage = idMessage;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + idMessage;
		result = prime * result + idUser;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UserMessagePK other = (UserMessagePK) obj;
		if (idMessage != other.idMessage)
			return false;
		if (idUser != other.idUser)
			return false;
		return true;
	}
}